package com.weiiew.versionservice.mapper;

import com.weiiew.common.entity.dto.version;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * @author 魏锴
 * @description 针对表【version】的数据库操作Mapper
 * @createDate 2024-02-05 00:31:11
 * @Entity com.example.adminBackEnd.Entity.dao.version
 */
@Mapper
public interface VersionMapper {

    @Delete("delete from version where id = #{id}")
    int deleteById(Integer id);

    @Select("select id, name, description from version")
    List<version> getVersions();

    @Insert("insert into version(name, description) value (#{name}, #{description})")
    boolean create(version version);

    @Update("update version set name = #{name}, description = #{description} where id = #{id}")
    boolean update(version version);

    boolean hasRelation(Integer id);

    @Delete("delete from version where id = #{id};")
    boolean remove(Integer id);
}




